package com.scott.spring.ch10.service;

/**
 * @author 黄后林
 * @version 1.0
 * @date 2021-12-14 13:46:47
 */
public class RoleService {


    public RoleService() {
        System.out.println("--------执行ch10#RoleService--------");
    }

    public int add(int x ,int y){
        System.out.println("--------执行ch10#add--------");
        int sum = x+y;
        return sum;
    }

    // 容器关闭前执行
    public void destroyMethod()  {
        System.out.println("--------执行ch10#destroyMethod--------");
    }
}
